<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<include file="public:meta" />
	<link href="../public/css/members/common.css" rel="stylesheet" type="text/css" />
	<script src="../public/js/members/jquery.common.js" type="text/javascript" language="javascript"></script>
</head>
<body>
	<include file="header" />
	<div class="J_apilogin_bind_box apilogin_binding_new" style="display:block">
		<div class="apil">
			<div class="tbnox">
				<div class="tit">你已经登录{$third_name}账号</div>
				<div class="imgbox">
					<img src="{$user_bind_info.keyavatar_big}" border="0">
				</div>
				<div class="apiname">{$user_bind_info.username}</div>
			</div>
		</div>
		<div class="apic"></div>
		<div class="apir">
			<div class="regtitson">
				<div class="alohtit">注册并绑定新账号</div>
				<div class="clear"></div>
			</div>
			<div class="reg_tab">
				<div class="J_tab_list tab_list select"><div class="txt">求职者注册</div><div class="bttom_line"></div></div>
				<div class="J_tab_list tab_list last"><div class="txt icon2">企业HR注册</div><div class="bttom_line"></div></div>
				<div class="clear"></div>
			</div>
			<div class="solid_line"></div>
			<div class="J_regcontent_box regcontent_box">
				<form class="J_passwordalert_group" id="regEmailForm" action="{:U('members/oauth_reg')}" method="post" onkeydown="if(event.keyCode==13){return false;}">
					<div class="J_validate_group">
						<div class="td1">
							<input class="input_295_34" name="username" id="username" type="text" placeholder="请输入用户名" autocomplete="off" readonly="readonly" value="{$user_bind_info.username}"/>
						</div>
						<div class="td2 J_showtip_box"></div>
						<div class="clear"></div>
					</div>
					<div class="J_validate_group">
						<div class="td1">
							<input class="input_295_34" name="email" id="email" type="text" placeholder="请输入常用邮箱" autocomplete="off" readonly="readonly" value="{$user_bind_info.email}"/>
						</div>
						<div class="td2 J_showtip_box"></div>
						<div class="clear"></div>
					</div>
					<div class="agreement link_blue"><label><input name="agreement" type="checkbox" value="" checked="checked" />
					我已阅读并同意<a href="javascript:;" class="J_reg_agreement">《{:C('qscms_site_name')}用户服务协议》</a></label></div>
					<input type="hidden" name="reg_type" value="2" />
					<input type="hidden" name="utype" value="2">
					<input name="ucenter" type="hidden" value="bind">
					<div class="btnbox"><input id="btnEmailRegister" type="submit" value="注册" class="btn_reg J_hoverbut" /></div>
				</form>	
			</div>
			<div class="J_regcontent_box regcontent_box last">
				<form class="J_passwordalert_group" id="registerForm" action="{:U('members/oauth_reg')}" method="post" onkeydown="if(event.keyCode==13){return false;}">
					<div class="rl J_focus">
						<div class="regtit">企业信息</div>
						<div class="J_validate_group">
							<div class="td1">
								<input class="input_295_34" name="companyname" id="companyname" type="text" placeholder="请输入企业名称" autocomplete="off" />
							</div>
							<div class="td2 J_showtip_box"></div>
						</div>
						<div class="J_validate_group">
							<div class="td1">
								<input class="input_295_34" name="contact" id="contact" type="text" placeholder="请输入企业联系人" autocomplete="off" />
							</div>
							<div class="td2 J_showtip_box"></div>
						</div>
						<div class="J_validate_group">
							<div class="td1">
								<div class="tel_td1">
									<input class="input_295_34" name="landline_tel_first" id="landline_tel_first" type="text" placeholder="区号"/>
								</div>
								<div class="tel_td2">
									<input class="input_295_34" name="landline_tel_next" id="landline_tel_next" type="text" placeholder="固定电话"/>
								</div>
								<div class="tel_td3">
									<input class="input_295_34" name="landline_tel_last" id="landline_tel_last" type="text" placeholder="分机号"/>
								</div>
								<div class="clear"></div>
							</div>
							<div class="td2 J_showtip_box"></div>
						</div>
						<div class="J_validate_group">
							<div class="td1">
								<input class="input_295_34" name="telephone" id="telephone" type="text" placeholder="请输入手机号" autocomplete="off" />
							</div>
							<div class="td2 J_showtip_box"></div>
						</div>
						<div class="clear"></div>
						<div class="tips_td">固定电话和手机号码至少填写一项</div>
						<div class="regtit">账户信息<span>(用于登录{:C('qscms_site_name')})</span></div>
						<div class="J_validate_group">
							<div class="td1">
								<input class="input_295_34" name="username" id="username" type="text" placeholder="请输入用户名" autocomplete="off" value="{$user_bind_info.username}"/>
							</div>
							<div class="td2 J_showtip_box"></div>
						</div>
						<div class="J_validate_group">
							<div class="td1">
								<input class="input_295_34" name="email" id="email" type="text" placeholder="请输入常用邮箱" autocomplete="off" value="{$user_bind_info.email}"/>
							</div>
							<div class="td2 J_showtip_box"></div>
						</div>
						<div class="clear"></div>
						<div class="agreement link_blue"><label><input name="agreement" type="checkbox" value="" checked="checked" />
						我已阅读并同意<a href="javascript:;" class="J_reg_agreement" id="reg_agreement">《{:C('qscms_site_name')}用户服务协议》</a></label></div>
						<div class="btnbox">
							<input name="utype" type="hidden" value="1">
							<input type="hidden" name="reg_type" value="2">
							<input type="hidden" name="landline_tel" id="landline_tel" value="">
							<input name="ucenter" type="hidden" value="bind">
							<input name="" id="btnRegister" type="submit" value="注册" class="btn_reg J_hoverbut" />
						</div>
					</div>
					<div class="clear"></div>
				</form>
			</div>
			<div class="clear"></div>
		</div>
	</div>
	<div class="apilogin_binding_bg">
		<div class="bl"></div>
		<div class="br"></div>
		<div class="clear"></div>
	</div>
	<include file="public:footer_min" />
	<script type="text/javascript" src="../public/js/jquery.form.js"></script>
	<script type="text/javascript" src="../public/js/jquery.validate.js"></script>
	<script type="text/javascript" src="../public/js/members/jquery.pwdalert.js"></script>
	<script type="text/javascript" src="../public/js/members/jquery.validate.uc.js"></script>
	<script type="text/javascript" src="../public/js/jquery.modal.dialog.js"></script>
	<script type="text/javascript">
		//注册协议弹框
	  	$(".J_reg_agreement").click(function(){
			var qsDialog = $(this).dialog({
        		title: "{:C('qscms_site_name')}注册协议",
				backdrop: false
			});
			$.getJSON("{:U('Home/Members/agreement')}",function(result){
				if(result.status==1){
					qsDialog.setContent(result.data);
				}
			});
		});
		// 已有账号绑定
		$('#J_dobind').live('click', function() {
	        var usernameValue = $.trim($('input[name="username"]').val());
	        var passwordValue = $.trim($('input[name="password"]').val());
	        var $thisTypeBox = $(this).closest('.apir');
	        if (usernameValue == "") {
	            $thisTypeBox.addClass('openerr');
	            $('#J_errbox').text('请填写手机号/会员名/邮箱');
	            $('#username').focus();
	            return false;
	        }
	        if (passwordValue == "") {
	            $thisTypeBox.addClass('openerr');
	            $('#J_errbox').text('请输入密码');
	            $('#password').focus();
	            return false;
	        }
	        $thisTypeBox.removeClass('openerr');
	        $('#formDoBind').submit();
	    });

	    /* 注册新账号绑定 */
	    // 企业个人注册方式切换
	    $('.J_tab_list').click(function() {
	    	$(this).addClass('select').siblings().removeClass('select');
	    	var index = $('.J_tab_list').index(this);
	    	$('.J_regcontent_box').eq(index).show().siblings('.J_regcontent_box').hide();
	    });
	</script>
</body>
</html>